﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing.Design;
using System.Drawing.Imaging;
using System.Drawing;

namespace Improve157
{
    public class Chapter_7
    {
        public void Method1()
        {
            Salary salary = new Salary();
            salary.GetSexString();

        }

        public void Method2()
        {
            Commadnder commadnder = new StartCommadner();
            Method3(commadnder);

            commadnder = new StopCommadner();
            Method3(commadnder);
        }

        public void Method3(Commadnder commadnder)
        {
            commadnder.Excute();
        }
    }

    public static class SalaryExtension
    {
        static SalaryExtension()
        {

        }

        public static string GetSexString(this Salary salary)
        {
            return salary.ToString();
        }

    }


    public abstract class Commadnder
    {
        public abstract void Excute();
    }

    public class StartCommadner : Commadnder
    {
        public override void Excute()
        {
            //启动操作
        }
    }
    public class StopCommadner : Commadnder
    {
        public override void Excute()
        {
            //停止操作
        }
        static readonly object padlock = new object();
    }

    public class Salary
    {
        public void SetSalary(Employee employee)
        {

        }

    }
    public class MangerSalary : Salary
    {
        public void SetSalary(MangerEmployee mangerEmployee)
        {

        }

    }

    public class Employee
    {
        public static void StaticMethod1()
        {
        }
    }
    public class MangerEmployee : Employee
    {
        /// <summary>
        /// 请使用Instance方法创建
        /// </summary>
        protected MangerEmployee()
        {

        }
    }


    public class Zoo : System.Collections.IComparer
    {
        public int Compare(object x, object y)
        {
           throw new NotImplementedException();
        }
    }
        

    public class Week
    {
        public static readonly Week Moday = new Week(1);

        public static readonly Week Tuesday = new Week(1);

        public static readonly Week Wednesday = new Week(1);
        private int _InfoType;

        private Week(int infoType)
        {
            _InfoType = infoType;
        }
    }
}
